package com.cloud.system.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Table(name = "notice")
public class Notice {
    @Id
    @Column(name = "notice_id")
    private int noticeId;

    /**
     * 标题
     */
    @Column(name = "title")
    private String title;

    /**
     * 内容
     */
    @Column(name = "content")
    private String content;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 创建人
     */
    @Column(name = "create_human")
    private String createHuman;

    /**
     * 创建人标识
     */
    @Column(name = "create_human_id")
    private Long createHumanId;

    /**
     * 发布单位
     */
    @Column(name = "publish_unit")
    private String publishUnit;

    /**
     * 重要等级,分为5个等级
     */
    @Column(name = "grade")
    private int grade;

    /**
     * 附件标识集合，以/分隔，与media表关联
     */
    @Column(name = "attachment_ids")
    private String attachmentIds;

    /**
     * 附件名称集合，以/分隔
     */
    @Column(name = "attachment_names")
    private String attachmentNames;

    public Notice() {
    }

    public Notice(String title, String content, Date createTime, String createHuman, Long createHumanId, String publishUnit, int grade, String attachmentIds, String attachmentNames) {
        this.title = title;
        this.content = content;
        this.createTime = createTime;
        this.createHuman = createHuman;
        this.createHumanId = createHumanId;
        this.publishUnit = publishUnit;
        this.grade = grade;
        this.attachmentIds = attachmentIds;
        this.attachmentNames = attachmentNames;
    }

    public int getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(int noticeId) {
        this.noticeId = noticeId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getCreateHuman() {
        return createHuman;
    }

    public void setCreateHuman(String createHuman) {
        this.createHuman = createHuman;
    }

    public Long getCreateHumanId() {
        return createHumanId;
    }

    public void setCreateHumanId(Long createHumanId) {
        this.createHumanId = createHumanId;
    }

    public String getPublishUnit() {
        return publishUnit;
    }

    public void setPublishUnit(String publishUnit) {
        this.publishUnit = publishUnit;
    }

    public int getGrade() {
        return grade;
    }

    public void setGrade(int grade) {
        this.grade = grade;
    }

    public String getAttachmentIds() {
        return attachmentIds;
    }

    public void setAttachmentIds(String attachmentIds) {
        this.attachmentIds = attachmentIds;
    }

    public String getAttachmentNames() {
        return attachmentNames;
    }

    public void setAttachmentNames(String attachmentNames) {
        this.attachmentNames = attachmentNames;
    }
}
